var Guifan = new Vue({

    el : '#GuifanDetail',
    data :{
        DeptId : $("#DeptId").val(),
        jiashuid :  $("#jiashuid").val(),
        title :  $("#title").val(),

        qiyeleixingid:'',
        tuichuleixing:'',
        tuichufangshiid:'',
        guifanId:'',
        guifanluoshiid:'',
        zhengmingcailiaoid:'',

        guifan:{},
        /*zhengmingcailiao:{},*/
        guifanlist : [],
        qiyeleixinglist:[],
        tuichufangshilist:[],
        FujianList:[],

        editFlag : 0,					// 0:新增，1：修改
        show : false,					// 显示列表是否有数据

        pageIndex : 1,
        pageSize :6,
        pageCount : 0,
        recordCount : 0,
        inputPageIndexValue : "",

    },
    created : function() {
        this.findJiashu();
        this.title = this.title+" 规范落实情况查询"
    },
    methods : {
        findJiashu: function(){
            var _this = this;
            layer.open({type:3});
            $.post("../guifanluoshi_qingkuang/find_valid_by_jiashuid",{
                jiashuid : _this.jiashuid,
                rdm : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if (ppData != null){
                    if(ppData.result == "1"){
                        var data=ppData.resultContent;

                        if(data.length > 0){
                            _this.guifanlist=data;
                        }

                    }else{
                        layer.alert(ppData.message);
                    }
                }


            },"json");
        },

        ShowFujian : function(ppFujianList){
            $("#ZhengmingcailiaonModal").modal();
            var _this = this;
            _this.FujianList=ppFujianList;

        },


        toclose: function(){
            xadmin.close();
        },

        //跳到首页
        SetPageIndex : function(){
            this.pageIndex = 1;
        },
        SetPageEnd : function(){
            this.pageIndex = this.pageCount;
        },
        //上一页
        SetPageIndexPrePage : function(){
            var PrePage = ((this.pageIndex -1) <= 0) ? 1 : (this.pageIndex -1);
            this.pageIndex = PrePage;
        },
        //下一页
        SetPageIndexNextPage : function(){
            var NextPage = ((this.pageIndex +1) >= this.pageCount) ? this.pageCount : (this.pageIndex +1);
            this.pageIndex = NextPage;
        },
        //跳转界面
        JumpPage : function(){
            if(this.inputPageIndexValue <= 1){
                this.inputPageIndexValue = 1;
            }else if(this.inputPageIndexValue >= this.pageCount){
                this.inputPageIndexValue = this.pageCount;
            }
            this.pageIndex = this.inputPageIndexValue;
            this.inputPageIndexValue = '';
        },

    },
    watch :{

    }

});
